import {
	createApp
} from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia';
import router from './router/index';
import ElementPlus from 'element-plus'; //引入element-plus
import 'element-plus/theme-chalk/index.css';
import 'element-plus/dist/index.css'
// import * as Icons from '@element-plus/icons-vue' // 引入所有图标，并命名为 Icons
import './style/variables.rem.scss';
import './style/index.scss' //全局样式

import './permission' // permission control
import vdown from './directive/cdown';
import 'remixicon/fonts/remixicon.css';

const app = createApp(App);
const pinia = createPinia();
// 通过遍历的方式注册所有 svg组件，会牺牲一点点性能
// for (let i in Icons) {
//   app.component(i, Icons[i])
// }
app.directive('down', vdown)
app.use(pinia);
app.use(router).use(ElementPlus).mount('#app')
